package com.hy.service;

import com.hy.bean.Producertable;
import com.hy.bean.RespBean;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
* @author ZZW
* @description 针对表【buytable】的数据库操作Service
* @createDate 2024-05-14 22:02:54
*/
public interface BuytableService {
    public List<Map<String,Object>> queryAllByLimit(String state,Integer page, Integer limit) throws Exception;

    public long count(String state) throws Exception;

    long countDetails(String state,String status,Integer id) throws Exception;

    List<Map<String,Object>> queryAllStatis(String buyNumber,String buyer, String producername, String buyTime, String reachTime, Integer page, Integer limit) throws Exception;


    public long countStatis(String buyNumber, String buyer, String producername, String buyTime, String reachTime) throws Exception;

    boolean updateState(Integer id,String state,Integer userId) throws Exception;

    boolean updateInfo(Integer id,Integer userId,String Info) throws Exception;

    List<Map<String, Object>> queryAllDetails(String state,String status,Integer id, Integer page, Integer limit) throws Exception;

    List<Producertable> queryAllVendor() throws Exception;

    long countCar(String name) throws Exception;

    boolean add(Map<String,Object> map) throws Exception;

    boolean update(Integer cid,Integer lid,Double costPrice,Integer buyCount,Double totalPrice,String partDetailChanger);

    int updateCode(int cid,String code, Integer id, String name) throws Exception;

    boolean deleteByidBycid(Integer id,Integer cid) throws SQLException;

    List<Producertable> listProducertable(Integer page, Integer limit) throws Exception;

    long countProducertable() throws Exception;

    RespBean queryAllByState();

    RespBean queryAllById(Integer id);

    int addProducertable(Producertable producertable) throws Exception;


    int updateProducertable(Producertable producertable) throws Exception;

    int deleteProducertable(Integer id) throws Exception;

    boolean updateUserTime(Integer id,int userId,String state) throws SQLException;

}
